;;;
;;;
;;;	Author:	Unknown
;;;
;;;	From AUGI Forum
;;;	Posted by: icbinr
;;;
(defun c:mt2ml ( / oobj nobj nstrg)
  (vl-load-com)
;;;  (SETQ old-note-ss (ssget '((-4 . "<OR")(0 . "LEADER")(0 . "MTEXT")(0 . "TEXT")(0 . "LINE")(0 . "POLYLINE")(0 . "LWPOLYLINE")(-4 . "OR>"))))
  (setq oobj (vlax-ename->vla-object (car (nentsel "\nSelect source text: "))))
  (if (OR (=(vlax-get-property oobj 'ObjectName) "AcDbMText")(=(vlax-get-property oobj 'ObjectName) "AcDbText"))
    (setq nstrg (vlax-get-property oobj 'TextString))
    (exit)
  )
  (command "_MLEADER")
  (while (= 1 (logand (getvar "CMDACTIVE") 1))(PRINC "\nEnter Leader Point: ")(PRINC)(command PAUSE))
  (setq nobj (vlax-ename->vla-object (entlast)))
  (if (= (vlax-get-property nobj 'ObjectName) "AcDbMLeader")
    (vlax-put-property nobj 'TextString nstrg)
    (exit)	   
  )
  (entdel (vlax-vla-object->ename oobj))
  (princ)
)
(defun C:mltstyle ()
  (if c:mklayr nil (load "mklayr" "\nFile MKLAYR.LSP not loaded! "))
  (c:svlayr)
  (if set_mjrg nil (load "set_mjrg" "\nFile SET_MJRG.LSP not loaded! "))
  (set_mjrg)
  (IF (EQ (GETVAR "tilemode") 1)
    (SETQ prod "MODL")
    (PROGN
      (if gvpno nil (LOAD "gvpno" "\nFile GVPNO.LSP loaded! "))
      (gvpno)
    )
  )
  (SETQ colr "6"
        llt "-"
	modf "NOTE"
  )
  (c:mklayr)
  (IF dimscl NIL (LOAD "dimscl" "\nFile DIMSCL.LSP not loaded! "))
  (dimscl)
  (setq nobj (vlax-ename->vla-object (car(entsel))))
  (if (EQ (vlax-get-property nobj 'ObjectName) "AcDbMLeader")
    (PROGN
;;;      (vlax-put-property nobj 'TextString nstrg)
      (vlax-put-property nobj 'ArrowheadBlock "DIMARO")
      (vlax-put-property nobj 'ArrowheadSize 0.125)
;;;      (vlax-put-property nobj 'ArrowheadType 20)
      (vlax-put-property nobj 'BlockConnectionType 0)
      (vlax-put-property nobj 'BlockScale 1.0)
;;;      (vlax-put-property nobj 'ContentBlockName "")
;;;      (vlax-put-property nobj 'ContentBlockType 6)
;;;      (vlax-put-property nobj 'ContentType 2)
;;;      (vlax-put-property nobj 'DogLegged -1)
;;;      (vlax-put-property nobj 'DoglegLength 0.125)
;;;      (vlax-put-property nobj 'EntityTransparency "ByLayer")
      (vlax-put-property nobj 'LandingGap 0.09)
      (vlax-put-property nobj 'Layer (getvar "clayer"))
;;;      (vlax-put-property nobj 'LeaderLineColor #<VLA-OBJECT IAcadAcCmColor 000000003a4d9720>)
      (vlax-put-property nobj 'LeaderLinetype "ByBlock")
      (vlax-put-property nobj 'LeaderLineWeight -2)
      (vlax-put-property nobj 'LeaderType 1)
      (vlax-put-property nobj 'Linetype "ByLayer")
      (vlax-put-property nobj 'LinetypeScale 1.0)
      (vlax-put-property nobj 'Lineweight -1)
      (vlax-put-property nobj 'Material "ByLayer")
;;;      (vlax-put-property nobj 'PlotStyleName "ByLayer")
;;;      (vlax-put-property nobj 'ScaleFactor 1.0)
      (vlax-put-property nobj 'StyleName "Standard")
      (vlax-put-property nobj 'TextAttachmentDirection 0)
      (vlax-put-property nobj 'TextBackgroundFill -1)
      (vlax-put-property nobj 'TextBottomAttachmentType 0)
      (vlax-put-property nobj 'TextDirection 5)
      (vlax-put-property nobj 'TextFrameDisplay 0)
      (vlax-put-property nobj 'TextHeight 0.11)
      (vlax-put-property nobj 'TextJustify 1)
      (vlax-put-property nobj 'TextLeftAttachmentType 1)
;;;      (vlax-put-property nobj 'TextLineSpacingDistance (* dimsc 0.16667))
      (vlax-put-property nobj 'TextLineSpacingFactor 1.0)
      (vlax-put-property nobj 'TextLineSpacingStyle 1)
      (vlax-put-property nobj 'TextRightAttachmentType 5)
      (vlax-put-property nobj 'TextRotation 0.0)
;;;      (vlax-put-property nobj 'TextString "We did it!")
      (vlax-put-property nobj 'TextStyleName "Standard")
      (vlax-put-property nobj 'TextTopAttachmentType 0)
      (vlax-put-property nobj 'TextWidth 2.0)
;;      (vlax-put-property nobj 'TrueColor #<VLA-OBJECT IAcadAcCmColor 000000003a4d6180>
      (vlax-put-property nobj 'Visible -1)
      (c:rslayr)
    )
    (exit)	   
  )
)